import type { UniverseType } from "../../../sde/entity";

/**
 * 行星资源产品
 */
export class PlanetProduct {
  name: string;
  id: number;
  type: UniverseType;
  count: number;
  cycleCount?: number;
  volume?: number;
  constructor(count: number, type: UniverseType, cycleCount?: number) {
    this.type = type;
    this.name = type.name;
    this.id = type.id;
    this.count = count;
    this.cycleCount = cycleCount;
    if (this.count) {
      this.volume = this.count * type.volume;
    }
  }
}
